
import Vue from 'vue';

import App from './App.vue';

import VueRouter from 'vue-router';

Vue.use(VueRouter);


//豆瓣
import home from './components/Home.vue';
import login from './components/login/login.vue'
import search from './components/search/search.vue'
import shopcar from './components/shopcar/shopcar.vue'

import doubanmovie from './components/douban/doubanmovie.vue'
import doubanbook from './components/douban/doubanbook.vue'
import doubancity from './components/douban/doubancity.vue'
import doubandianshi from './components/douban/doubandianshi.vue'
import doubanmusic from './components/douban/doubanmusic.vue'


import detile from './components/subcom/detile.vue'
import yuanxian_movie from './components/subcom/yuanxianMovie.vue'

var vueRouterObj = new VueRouter({
	linkActiveClass :'mui-active', //将激活的路由添加一个mui-active类名称
	routes:[
		{path:'/',redirect:'/Home'},
		{path:'/Home',component:home},
        {path:'/login',component:login},
        {path:'/search',component:search},
		{path:'/shopcar',component:shopcar},
		//电影列表
		{path:'/douban/movie',component:doubanmovie},
		{path:'/douban/book',component:doubanbook},
		{path:'/douban/city',component:doubancity},
		{path:'/douban/dianshi',component:doubandianshi},
		{path:'/douban/music',component:doubanmusic},


        //详情页
        {path:'/detile/:movie_or_book/:id',component:detile},
        {path:'/yuanxian_movie',component:yuanxian_movie}
	]
});


import 'mint-ui/lib/style.min.css'
import mintUI  from 'mint-ui'
Vue.use(mintUI);

import '../statics/mui/css/mui.css'
import '../statics/mui/css/icons-extra.css'

import vueResource  from 'vue-resource'
Vue.use(vueResource);


// 注册vue-preview组件
import VuePreview from 'vue-preview'
Vue.use(VuePreview);

import '../statics/css/site.css'

new Vue({
	el:'#app',
	router:vueRouterObj,  //使用路由规则对象
	render:create=>create(App)
});